package com.zbkj.dal.pojo.response.order.merchant;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer;
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer;
import com.zbkj.dal.pojo.response.OrderInfoFrontDataResponse;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.List;

/**
 * @author wangzhengyan
 * @date 2024/4/12 2:25 PM
 */
@Data
@ApiModel(value = "商户后台管理-买入订单详情", description = "商户后台管理-买入订单详情")
public class MerchantOrderPurchaseDetailNewResponse {
    // 用户信息
    @ApiModelProperty(value = "订单号")
    private String orderNo;

    @ApiModelProperty(value = "用户id")
    private Integer uid;

    @ApiModelProperty(value = "用户信息-收货人")
    private String realName;

    @ApiModelProperty(value = "用户信息-手机号")
    private String userPhone;

    @ApiModelProperty(value = "用户信息-收货地址")
    private String userAddress;

    // 商品信息
    @ApiModelProperty(value = "订单商品详情")
    List<OrderInfoFrontDataResponse> orderDetailList;

    // 送货信息
    @ApiModelProperty(value = "配送方式 1=快递 ，2=门店自提")
    private Integer shippingType;

    /**
     * 快递名称
     */
    @ApiModelProperty(value = "快递名称")
    private String deliveryName;

    /**
     * 快递单号
     */
    @ApiModelProperty(value = "快递单号")
    private String trackingNumber;

    // 支付信息

    /**
     * 支付类型
     */
    @ApiModelProperty(value = "支付类型 订单支付 超时罚款")
    private String payChannel;

    @ApiModelProperty(value = "商品销售价（元）")
    private BigDecimal proTotalPrice;

    @ApiModelProperty(value = "订单总价")
    private BigDecimal totalPrice;

    @ApiModelProperty(value = "运费")
    private BigDecimal totalPostage;

    /**
     * 雅识抵扣金额
     */
    @ApiModelProperty(value = "雅识抵扣金额")
    private BigDecimal integralPrice;

    /**
     * 实际支付
     */
    @ApiModelProperty(value = "实际支付")
    private BigDecimal payPrice;

    /**
     * 支付方式
     */
    @ApiModelProperty(value = "支付方式:weixin,alipay,yue")
    private String payType;


    // 订单信息
    /**
     * 订单状态
     *
     * @see com.zbkj.dal.base.enums.OrderStatusEnums
     */
    @ApiModelProperty(value = "订单状态 ")
    private String status;

    /**
     * 创建时间
     */
    @ApiModelProperty(value = "创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonDeserialize(using = LocalDateTimeDeserializer.class)
    @JsonSerialize(using = LocalDateTimeSerializer.class)
    private LocalDateTime createTime;

    /**
     * 支付时间
     */
    @ApiModelProperty(value = "支付时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonDeserialize(using = LocalDateTimeDeserializer.class)
    @JsonSerialize(using = LocalDateTimeSerializer.class)
    private LocalDateTime payTime;

    /**
     * 完成时间
     */
    @ApiModelProperty(value = "完成时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonDeserialize(using = LocalDateTimeDeserializer.class)
    @JsonSerialize(using = LocalDateTimeSerializer.class)
    private LocalDateTime completeTime;

    // 归还时间
    @ApiModelProperty(value = "归还时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonDeserialize(using = LocalDateTimeDeserializer.class)
    @JsonSerialize(using = LocalDateTimeSerializer.class)
    private LocalDateTime returnTime;

    /**
     * 关闭原因
     */
    @ApiModelProperty(value = "关闭原因")
    private String closeReason;

    /**
     * 关闭时间
     */
    @ApiModelProperty(value = "关闭时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonDeserialize(using = LocalDateTimeDeserializer.class)
    @JsonSerialize(using = LocalDateTimeSerializer.class)
    private LocalDateTime closeTime;
}
